//
//  MainFirst_MagazineListToeknWX_PGCCell_WX.m
//  ZITHER
//
//  Created by weixin on 2019/4/15.
//  Copyright © 2019 weixn. All rights reserved.
//

#import "MainFirst_MagazineListToeknWX_PGCCell_WX.h"
#import "MainFirst_MagazineVideo_VC_WX.h"
#import "Ugc_HomePage_VC_V3.h"
#import "CoverCreateListModel.h"
#import "HomePageDetailModel.h"
#import "MainFirst_MagazineList_UserHeadCell_WX.h"
#import "MainFirst_Magazine_VC_WX.h"

@implementation MainFirst_MagazineListToeknWX_PGCCell_WX

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
//    [self configComment];
//    [self setUI];
//    [self setMasonry];
    
}

-(void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event{
    MainFirst_Magazine_VC_WX *vc = [[MainFirst_Magazine_VC_WX alloc]init];
    vc.pgcId = self.model.relId;
    [self.getNav pushViewController:vc animated:YES];
//        HomePageDetailModelpgcJson *model =[[HomePageDetailModelpgcJson alloc]init];
//        model.src = self.model.videoUrl;
//        MainFirst_MagazineVideo_VC_WX *vc = [[MainFirst_MagazineVideo_VC_WX alloc]init];
//        vc.modelJson = model;
//        [self.getNav pushViewController:vc animated:YES];
}

-(void)setModel:(CoverCreateListModelSub *)model
{
    _model = model;
    


    self.title.text = model.pgcTitle;
    if ([model.documentType isEqualToString:@"video"]) {
        self.titleSub.text = @"#视频";
        self.title.text = model.pgcTitle;
        NSString *str = [NSString stringWithFormat:@"%@%@",RootUrlImage,model.coverImg];
        [self.ImageV sd_setImageWithURL:[NSURL URLWithString:str] placeholderImage:[UIImage imageNamed:@"ucg_img_loding"]];
    }else{
        self.titleSub.text = @"#杂志";
        self.title.text = model.pgcTitle;
        NSString *str = [NSString stringWithFormat:@"%@%@",RootUrlImage,model.coverImg];
        [self.ImageV sd_setImageWithURL:[NSURL URLWithString:str] placeholderImage:[UIImage imageNamed:@"ucg_img_loding"]];
    }

    
   
        
}





@end
